package com.smart.community.region.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 店铺租金记录DTO
 * 
 * @author Wu.Liang
 * @version 1.0.0
 * @since 2025-01-30
 */
@Data
@Schema(description = "店铺租金记录DTO")
public class ShopRentRecordDTO {
    
    /**
     * 记录ID
     */
    @Schema(description = "记录ID")
    private Long id;
    
    /**
     * 店铺ID
     */
    @NotNull(message = "店铺ID不能为空")
    @Positive(message = "店铺ID必须大于0")
    @Schema(description = "店铺ID", required = true)
    private Long shopId;
    
    /**
     * 租金金额
     */
    @NotNull(message = "租金金额不能为空")
    @DecimalMin(value = "0.01", message = "租金金额必须大于0")
    @Schema(description = "租金金额", required = true)
    private BigDecimal rentAmount;
    
    /**
     * 租金月份(YYYY-MM)
     */
    @NotBlank(message = "租金月份不能为空")
    @Pattern(regexp = "^\\d{4}-\\d{2}$", message = "租金月份格式不正确，应为YYYY-MM")
    @Schema(description = "租金月份(YYYY-MM)", required = true, example = "2025-01")
    private String rentMonth;
    
    /**
     * 是否月度租金：0-否，1-是
     */
    @Schema(description = "是否月度租金：0-否，1-是")
    private Integer isMonthlyRent;
    
    /**
     * 租赁开始日期
     */
    @Schema(description = "租赁开始日期")
    private LocalDate leaseStartDate;
    
    /**
     * 租赁结束日期
     */
    @Schema(description = "租赁结束日期")
    private LocalDate leaseEndDate;
    
    /**
     * 租金期间
     */
    @NotBlank(message = "租金期间不能为空")
    @Size(max = 20, message = "租金期间长度不能超过20个字符")
    @Schema(description = "租金期间", required = true, example = "2025-01")
    private String rentPeriod;
    
    /**
     * 租金开始日期
     */
    @NotNull(message = "租金开始日期不能为空")
    @Schema(description = "租金开始日期", required = true)
    private LocalDate rentStartDate;
    
    /**
     * 租金结束日期
     */
    @NotNull(message = "租金结束日期不能为空")
    @Schema(description = "租金结束日期", required = true)
    private LocalDate rentEndDate;
    
    /**
     * 支付状态：0-未支付，1-已支付，2-逾期
     */
    @Schema(description = "支付状态：0-未支付，1-已支付，2-逾期")
    private Integer paymentStatus;
    
    /**
     * 支付方式
     */
    @Size(max = 20, message = "支付方式长度不能超过20个字符")
    @Schema(description = "支付方式", example = "CASH")
    private String paymentMethod;
    
    /**
     * 发票号码
     */
    @Size(max = 50, message = "发票号码长度不能超过50个字符")
    @Schema(description = "发票号码")
    private String invoiceNumber;
    
    /**
     * 备注
     */
    @Size(max = 500, message = "备注长度不能超过500个字符")
    @Schema(description = "备注")
    private String remark;
}
